package cn.com.infostrategy.ui.mdata.formatcomp;

import java.util.Stack;

import org.nfunk.jep.ParseException;
import org.nfunk.jep.function.PostfixMathCommand;

import cn.com.infostrategy.ui.mdata.BillFormatPanel;
import cn.com.infostrategy.ui.workflow.design.WorkFlowDesignWPanel;

public class GetWorkFlowPanel extends PostfixMathCommand {

	private BillFormatPanel formatpanel = null; //

	public GetWorkFlowPanel(BillFormatPanel _billcellpanel) {
		this.formatpanel = _billcellpanel; //
		numberOfParameters = 1; //
	}

	public void run(Stack inStack) throws ParseException {
		Object param_1 = inStack.pop();
		String templetCode = (String) param_1; //
		WorkFlowDesignWPanel wfpanel = null;
		if (templetCode.equals("")) {
			wfpanel = new WorkFlowDesignWPanel(false);
		} else {
			wfpanel = new WorkFlowDesignWPanel(templetCode, false);
		}

		String _returnkey = "workflow_" + formatpanel.getCompentSeq(); //
		formatpanel.getPanelMap().put(_returnkey, wfpanel); ////
		inStack.push(_returnkey); //
		//System.out.println(_returnkey + "=getList(\"" + templetCode + "\")"); //
	}
}
